package org.qydjk.common.pojo;

import javax.persistence.*;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * SResource entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "s_resource", catalog = "qydjk")
public class SResource implements java.io.Serializable {
	private static final long serialVersionUID = 9002207547124508439L;
	private Integer id;
	private String name;
	private String url;
	private String openMode;
	private String description;
	private String icon;
	private Integer pid;
	private Integer seq;
	private Integer status;
	private Integer opened;
	private Integer resourceType;
	private Date createTime;

	// Constructors

	/** default constructor */
	public SResource() {
	}

	public SResource(Integer id,String name, String url) {
		this.id = id;
		this.name = name;
		this.url = url;
	}

	/** minimal constructor */
	public SResource(String name, Integer seq, Integer status, Integer opened,
			Integer resourceType, Date createTime) {
		this.name = name;
		this.seq = seq;
		this.status = status;
		this.opened = opened;
		this.resourceType = resourceType;
		this.createTime = createTime;
	}

	/** full constructor */
	public SResource(String name, String url, String openMode,
			String description, String icon, Integer pid, Integer seq,
			Integer status, Integer opened, Integer resourceType,
					 Date createTime) {
		this.name = name;
		this.url = url;
		this.openMode = openMode;
		this.description = description;
		this.icon = icon;
		this.pid = pid;
		this.seq = seq;
		this.status = status;
		this.opened = opened;
		this.resourceType = resourceType;
		this.createTime = createTime;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "name", nullable = false, length = 64)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "url", length = 100)
	public String getUrl() {
		return this.url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	@Column(name = "open_mode", length = 32)
	public String getOpenMode() {
		return this.openMode;
	}

	public void setOpenMode(String openMode) {
		this.openMode = openMode;
	}

	@Column(name = "description")
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(name = "icon", length = 32)
	public String getIcon() {
		return this.icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	@Column(name = "pid")
	public Integer getPid() {
		return this.pid;
	}

	public void setPid(Integer pid) {
		this.pid = pid;
	}

	@Column(name = "seq", nullable = false)
	public Integer getSeq() {
		return this.seq;
	}

	public void setSeq(Integer seq) {
		this.seq = seq;
	}

	@Column(name = "status", nullable = false)
	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	@Column(name = "opened", nullable = false)
	public Integer getOpened() {
		return this.opened;
	}

	public void setOpened(Integer opened) {
		this.opened = opened;
	}

	@Column(name = "resource_type", nullable = false)
	public Integer getResourceType() {
		return this.resourceType;
	}

	public void setResourceType(Integer resourceType) {
		this.resourceType = resourceType;
	}

	@Column(name = "create_time", nullable = false, length = 19)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

}